<template>
  <div>
    通过父组件给子组件传递函数类型props来实现： comA
    <div>
      <el-button @click="sendData">发送数据</el-button>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    getcomAData: {
      type: Function,
      required: false,
    },
  },
  data() {
    return {};
  },
  methods: {
    sendData() {
      this.getcomAData("我是comB");
    },
  },
};
</script>